export enum ShiftType {
  GOTOWORK = 0,
  CHANGE = 1,
  GOOFFWORK = 2,
}

export const ShiftTypeDetail: { [key: string]: { color: string; text: string } } = {
  [ShiftType.GOTOWORK]: { color: "processing", text: "上班" },
  [ShiftType.CHANGE]: { color: "warning", text: "换班" },
  [ShiftType.GOOFFWORK]: { color: "error", text: "下班" },
};

export interface ShiftItem {
  id: number;
  userId: number;
  userName: string;
  face: string;
  type: ShiftType;
}

export type PartialShiftItem = Partial<ShiftItem>;

export interface ServiceEvaluationItem {
  id: number;
  teamId: number;
  teamName: string;
  collectorId: number;
  collector: string;
  smile: number;
  welcome: number;
  delivery: number;
  term: number;
  quality: number;
  createTime: string;
}

export type PartialServiceEvaluation = Partial<ServiceEvaluationItem>;

export interface ServiceReportItem {
  teamId: number;
  teamName: string;
  collectorId: number;
  collector: string;
  totalTimes: number;
  qualifiedTimes: number;
  qualifiedRate: number;
  smileRate: number;
  welcomeRate: number;
  deliveryRate: number;
  termRate: number;
}

export type PartialServiceReportItem = Partial<ServiceReportItem>;

export interface AttendanceItem {
  clockInTime: number;
  clockInType: number;
  face: string;
  jobNo: string;
  tollBooth: string;
  tollBoothNo: string;
  tollCollector: string;
}
